
/**
 * Tencent is pleased to support the open source community by making MSEC available.
 *
 * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
 *
 * Licensed under the GNU General Public License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. You may 
 * obtain a copy of the License at
 *
 *     https://opensource.org/licenses/GPL-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the 
 * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */


// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: head.proto

package srpc;

public final class Head {
  private Head() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface CRpcHeadOrBuilder extends
      // @@protoc_insertion_point(interface_extends:srpc.CRpcHead)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>required uint64 sequence = 10;</code>
     *
     * <pre>
     * RPC序列号      : 用于检验每个回包正确性
     * </pre>
     */
    boolean hasSequence();
    /**
     * <code>required uint64 sequence = 10;</code>
     *
     * <pre>
     * RPC序列号      : 用于检验每个回包正确性
     * </pre>
     */
    long getSequence();

    /**
     * <code>optional uint32 coloring = 20;</code>
     *
     * <pre>
     * RPC请求染色标志: 当前请求是否染色
     * </pre>
     */
    boolean hasColoring();
    /**
     * <code>optional uint32 coloring = 20;</code>
     *
     * <pre>
     * RPC请求染色标志: 当前请求是否染色
     * </pre>
     */
    int getColoring();

    /**
     * <code>optional uint64 color_id = 21;</code>
     *
     * <pre>
     * RPC日志染色ID  : 每个方法一个
     * </pre>
     */
    boolean hasColorId();
    /**
     * <code>optional uint64 color_id = 21;</code>
     *
     * <pre>
     * RPC日志染色ID  : 每个方法一个
     * </pre>
     */
    long getColorId();

    /**
     * <code>optional uint64 flow_id = 30;</code>
     *
     * <pre>
     * RPC调用ID      : 每个客户端请求唯一标识
     * </pre>
     */
    boolean hasFlowId();
    /**
     * <code>optional uint64 flow_id = 30;</code>
     *
     * <pre>
     * RPC调用ID      : 每个客户端请求唯一标识
     * </pre>
     */
    long getFlowId();

    /**
     * <code>optional int32 err = 40;</code>
     *
     * <pre>
     * 框架错误码
     * </pre>
     */
    boolean hasErr();
    /**
     * <code>optional int32 err = 40;</code>
     *
     * <pre>
     * 框架错误码
     * </pre>
     */
    int getErr();

    /**
     * <code>optional int32 result = 41;</code>
     *
     * <pre>
     * 业务接口返回值
     * </pre>
     */
    boolean hasResult();
    /**
     * <code>optional int32 result = 41;</code>
     *
     * <pre>
     * 业务接口返回值
     * </pre>
     */
    int getResult();

    /**
     * <code>optional bytes err_msg = 42;</code>
     *
     * <pre>
     * 错误描述
     * </pre>
     */
    boolean hasErrMsg();
    /**
     * <code>optional bytes err_msg = 42;</code>
     *
     * <pre>
     * 错误描述
     * </pre>
     */
    com.google.protobuf.ByteString getErrMsg();

    /**
     * <code>optional bytes caller = 50;</code>
     *
     * <pre>
     * RPC调用方业务名
     * </pre>
     */
    boolean hasCaller();
    /**
     * <code>optional bytes caller = 50;</code>
     *
     * <pre>
     * RPC调用方业务名
     * </pre>
     */
    com.google.protobuf.ByteString getCaller();

    /**
     * <code>required bytes method_name = 51;</code>
     *
     * <pre>
     * RPC方法名
     * </pre>
     */
    boolean hasMethodName();
    /**
     * <code>required bytes method_name = 51;</code>
     *
     * <pre>
     * RPC方法名
     * </pre>
     */
    com.google.protobuf.ByteString getMethodName();

    /**
     * <code>repeated bytes caller_stack = 60;</code>
     *
     * <pre>
     * RPC调用栈信息  : 存放方法名
     * </pre>
     */
    java.util.List<com.google.protobuf.ByteString> getCallerStackList();
    /**
     * <code>repeated bytes caller_stack = 60;</code>
     *
     * <pre>
     * RPC调用栈信息  : 存放方法名
     * </pre>
     */
    int getCallerStackCount();
    /**
     * <code>repeated bytes caller_stack = 60;</code>
     *
     * <pre>
     * RPC调用栈信息  : 存放方法名
     * </pre>
     */
    com.google.protobuf.ByteString getCallerStack(int index);
  }
  /**
   * Protobuf type {@code srpc.CRpcHead}
   *
   * <pre>
   * RPC消息头定义
   * </pre>
   */
  public static final class CRpcHead extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:srpc.CRpcHead)
      CRpcHeadOrBuilder {
    // Use CRpcHead.newBuilder() to construct.
    private CRpcHead(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private CRpcHead(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final CRpcHead defaultInstance;
    public static CRpcHead getDefaultInstance() {
      return defaultInstance;
    }

    public CRpcHead getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private CRpcHead(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 80: {
              bitField0_ |= 0x00000001;
              sequence_ = input.readUInt64();
              break;
            }
            case 160: {
              bitField0_ |= 0x00000002;
              coloring_ = input.readUInt32();
              break;
            }
            case 168: {
              bitField0_ |= 0x00000004;
              colorId_ = input.readUInt64();
              break;
            }
            case 240: {
              bitField0_ |= 0x00000008;
              flowId_ = input.readUInt64();
              break;
            }
            case 320: {
              bitField0_ |= 0x00000010;
              err_ = input.readInt32();
              break;
            }
            case 328: {
              bitField0_ |= 0x00000020;
              result_ = input.readInt32();
              break;
            }
            case 338: {
              bitField0_ |= 0x00000040;
              errMsg_ = input.readBytes();
              break;
            }
            case 402: {
              bitField0_ |= 0x00000080;
              caller_ = input.readBytes();
              break;
            }
            case 410: {
              bitField0_ |= 0x00000100;
              methodName_ = input.readBytes();
              break;
            }
            case 482: {
              if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
                callerStack_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
                mutable_bitField0_ |= 0x00000200;
              }
              callerStack_.add(input.readBytes());
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
          callerStack_ = java.util.Collections.unmodifiableList(callerStack_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return srpc.Head.internal_static_srpc_CRpcHead_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return srpc.Head.internal_static_srpc_CRpcHead_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              srpc.Head.CRpcHead.class, srpc.Head.CRpcHead.Builder.class);
    }

    public static com.google.protobuf.Parser<CRpcHead> PARSER =
        new com.google.protobuf.AbstractParser<CRpcHead>() {
      public CRpcHead parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new CRpcHead(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser<CRpcHead> getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    public static final int SEQUENCE_FIELD_NUMBER = 10;
    private long sequence_;
    /**
     * <code>required uint64 sequence = 10;</code>
     *
     * <pre>
     * RPC序列号      : 用于检验每个回包正确性
     * </pre>
     */
    public boolean hasSequence() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required uint64 sequence = 10;</code>
     *
     * <pre>
     * RPC序列号      : 用于检验每个回包正确性
     * </pre>
     */
    public long getSequence() {
      return sequence_;
    }

    public static final int COLORING_FIELD_NUMBER = 20;
    private int coloring_;
    /**
     * <code>optional uint32 coloring = 20;</code>
     *
     * <pre>
     * RPC请求染色标志: 当前请求是否染色
     * </pre>
     */
    public boolean hasColoring() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>optional uint32 coloring = 20;</code>
     *
     * <pre>
     * RPC请求染色标志: 当前请求是否染色
     * </pre>
     */
    public int getColoring() {
      return coloring_;
    }

    public static final int COLOR_ID_FIELD_NUMBER = 21;
    private long colorId_;
    /**
     * <code>optional uint64 color_id = 21;</code>
     *
     * <pre>
     * RPC日志染色ID  : 每个方法一个
     * </pre>
     */
    public boolean hasColorId() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * <code>optional uint64 color_id = 21;</code>
     *
     * <pre>
     * RPC日志染色ID  : 每个方法一个
     * </pre>
     */
    public long getColorId() {
      return colorId_;
    }

    public static final int FLOW_ID_FIELD_NUMBER = 30;
    private long flowId_;
    /**
     * <code>optional uint64 flow_id = 30;</code>
     *
     * <pre>
     * RPC调用ID      : 每个客户端请求唯一标识
     * </pre>
     */
    public boolean hasFlowId() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    /**
     * <code>optional uint64 flow_id = 30;</code>
     *
     * <pre>
     * RPC调用ID      : 每个客户端请求唯一标识
     * </pre>
     */
    public long getFlowId() {
      return flowId_;
    }

    public static final int ERR_FIELD_NUMBER = 40;
    private int err_;
    /**
     * <code>optional int32 err = 40;</code>
     *
     * <pre>
     * 框架错误码
     * </pre>
     */
    public boolean hasErr() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    /**
     * <code>optional int32 err = 40;</code>
     *
     * <pre>
     * 框架错误码
     * </pre>
     */
    public int getErr() {
      return err_;
    }

    public static final int RESULT_FIELD_NUMBER = 41;
    private int result_;
    /**
     * <code>optional int32 result = 41;</code>
     *
     * <pre>
     * 业务接口返回值
     * </pre>
     */
    public boolean hasResult() {
      return ((bitField0_ & 0x00000020) == 0x00000020);
    }
    /**
     * <code>optional int32 result = 41;</code>
     *
     * <pre>
     * 业务接口返回值
     * </pre>
     */
    public int getResult() {
      return result_;
    }

    public static final int ERR_MSG_FIELD_NUMBER = 42;
    private com.google.protobuf.ByteString errMsg_;
    /**
     * <code>optional bytes err_msg = 42;</code>
     *
     * <pre>
     * 错误描述
     * </pre>
     */
    public boolean hasErrMsg() {
      return ((bitField0_ & 0x00000040) == 0x00000040);
    }
    /**
     * <code>optional bytes err_msg = 42;</code>
     *
     * <pre>
     * 错误描述
     * </pre>
     */
    public com.google.protobuf.ByteString getErrMsg() {
      return errMsg_;
    }

    public static final int CALLER_FIELD_NUMBER = 50;
    private com.google.protobuf.ByteString caller_;
    /**
     * <code>optional bytes caller = 50;</code>
     *
     * <pre>
     * RPC调用方业务名
     * </pre>
     */
    public boolean hasCaller() {
      return ((bitField0_ & 0x00000080) == 0x00000080);
    }
    /**
     * <code>optional bytes caller = 50;</code>
     *
     * <pre>
     * RPC调用方业务名
     * </pre>
     */
    public com.google.protobuf.ByteString getCaller() {
      return caller_;
    }

    public static final int METHOD_NAME_FIELD_NUMBER = 51;
    private com.google.protobuf.ByteString methodName_;
    /**
     * <code>required bytes method_name = 51;</code>
     *
     * <pre>
     * RPC方法名
     * </pre>
     */
    public boolean hasMethodName() {
      return ((bitField0_ & 0x00000100) == 0x00000100);
    }
    /**
     * <code>required bytes method_name = 51;</code>
     *
     * <pre>
     * RPC方法名
     * </pre>
     */
    public com.google.protobuf.ByteString getMethodName() {
      return methodName_;
    }

    public static final int CALLER_STACK_FIELD_NUMBER = 60;
    private java.util.List<com.google.protobuf.ByteString> callerStack_;
    /**
     * <code>repeated bytes caller_stack = 60;</code>
     *
     * <pre>
     * RPC调用栈信息  : 存放方法名
     * </pre>
     */
    public java.util.List<com.google.protobuf.ByteString>
        getCallerStackList() {
      return callerStack_;
    }
    /**
     * <code>repeated bytes caller_stack = 60;</code>
     *
     * <pre>
     * RPC调用栈信息  : 存放方法名
     * </pre>
     */
    public int getCallerStackCount() {
      return callerStack_.size();
    }
    /**
     * <code>repeated bytes caller_stack = 60;</code>
     *
     * <pre>
     * RPC调用栈信息  : 存放方法名
     * </pre>
     */
    public com.google.protobuf.ByteString getCallerStack(int index) {
      return callerStack_.get(index);
    }

    private void initFields() {
      sequence_ = 0L;
      coloring_ = 0;
      colorId_ = 0L;
      flowId_ = 0L;
      err_ = 0;
      result_ = 0;
      errMsg_ = com.google.protobuf.ByteString.EMPTY;
      caller_ = com.google.protobuf.ByteString.EMPTY;
      methodName_ = com.google.protobuf.ByteString.EMPTY;
      callerStack_ = java.util.Collections.emptyList();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      if (!hasSequence()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasMethodName()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeUInt64(10, sequence_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeUInt32(20, coloring_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeUInt64(21, colorId_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeUInt64(30, flowId_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeInt32(40, err_);
      }
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        output.writeInt32(41, result_);
      }
      if (((bitField0_ & 0x00000040) == 0x00000040)) {
        output.writeBytes(42, errMsg_);
      }
      if (((bitField0_ & 0x00000080) == 0x00000080)) {
        output.writeBytes(50, caller_);
      }
      if (((bitField0_ & 0x00000100) == 0x00000100)) {
        output.writeBytes(51, methodName_);
      }
      for (int i = 0; i < callerStack_.size(); i++) {
        output.writeBytes(60, callerStack_.get(i));
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(10, sequence_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(20, coloring_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(21, colorId_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(30, flowId_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(40, err_);
      }
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(41, result_);
      }
      if (((bitField0_ & 0x00000040) == 0x00000040)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(42, errMsg_);
      }
      if (((bitField0_ & 0x00000080) == 0x00000080)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(50, caller_);
      }
      if (((bitField0_ & 0x00000100) == 0x00000100)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(51, methodName_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < callerStack_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeBytesSizeNoTag(callerStack_.get(i));
        }
        size += dataSize;
        size += 2 * getCallerStackList().size();
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static srpc.Head.CRpcHead parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static srpc.Head.CRpcHead parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static srpc.Head.CRpcHead parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static srpc.Head.CRpcHead parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static srpc.Head.CRpcHead parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static srpc.Head.CRpcHead parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static srpc.Head.CRpcHead parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static srpc.Head.CRpcHead parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static srpc.Head.CRpcHead parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static srpc.Head.CRpcHead parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(srpc.Head.CRpcHead prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code srpc.CRpcHead}
     *
     * <pre>
     * RPC消息头定义
     * </pre>
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:srpc.CRpcHead)
        srpc.Head.CRpcHeadOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return srpc.Head.internal_static_srpc_CRpcHead_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return srpc.Head.internal_static_srpc_CRpcHead_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                srpc.Head.CRpcHead.class, srpc.Head.CRpcHead.Builder.class);
      }

      // Construct using srpc.Head.CRpcHead.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        sequence_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000001);
        coloring_ = 0;
        bitField0_ = (bitField0_ & ~0x00000002);
        colorId_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000004);
        flowId_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000008);
        err_ = 0;
        bitField0_ = (bitField0_ & ~0x00000010);
        result_ = 0;
        bitField0_ = (bitField0_ & ~0x00000020);
        errMsg_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000040);
        caller_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000080);
        methodName_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000100);
        callerStack_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000200);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return srpc.Head.internal_static_srpc_CRpcHead_descriptor;
      }

      public srpc.Head.CRpcHead getDefaultInstanceForType() {
        return srpc.Head.CRpcHead.getDefaultInstance();
      }

      public srpc.Head.CRpcHead build() {
        srpc.Head.CRpcHead result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public srpc.Head.CRpcHead buildPartial() {
        srpc.Head.CRpcHead result = new srpc.Head.CRpcHead(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.sequence_ = sequence_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.coloring_ = coloring_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.colorId_ = colorId_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.flowId_ = flowId_;
        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
          to_bitField0_ |= 0x00000010;
        }
        result.err_ = err_;
        if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
          to_bitField0_ |= 0x00000020;
        }
        result.result_ = result_;
        if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
          to_bitField0_ |= 0x00000040;
        }
        result.errMsg_ = errMsg_;
        if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
          to_bitField0_ |= 0x00000080;
        }
        result.caller_ = caller_;
        if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
          to_bitField0_ |= 0x00000100;
        }
        result.methodName_ = methodName_;
        if (((bitField0_ & 0x00000200) == 0x00000200)) {
          callerStack_ = java.util.Collections.unmodifiableList(callerStack_);
          bitField0_ = (bitField0_ & ~0x00000200);
        }
        result.callerStack_ = callerStack_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof srpc.Head.CRpcHead) {
          return mergeFrom((srpc.Head.CRpcHead)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(srpc.Head.CRpcHead other) {
        if (other == srpc.Head.CRpcHead.getDefaultInstance()) return this;
        if (other.hasSequence()) {
          setSequence(other.getSequence());
        }
        if (other.hasColoring()) {
          setColoring(other.getColoring());
        }
        if (other.hasColorId()) {
          setColorId(other.getColorId());
        }
        if (other.hasFlowId()) {
          setFlowId(other.getFlowId());
        }
        if (other.hasErr()) {
          setErr(other.getErr());
        }
        if (other.hasResult()) {
          setResult(other.getResult());
        }
        if (other.hasErrMsg()) {
          setErrMsg(other.getErrMsg());
        }
        if (other.hasCaller()) {
          setCaller(other.getCaller());
        }
        if (other.hasMethodName()) {
          setMethodName(other.getMethodName());
        }
        if (!other.callerStack_.isEmpty()) {
          if (callerStack_.isEmpty()) {
            callerStack_ = other.callerStack_;
            bitField0_ = (bitField0_ & ~0x00000200);
          } else {
            ensureCallerStackIsMutable();
            callerStack_.addAll(other.callerStack_);
          }
          onChanged();
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasSequence()) {
          
          return false;
        }
        if (!hasMethodName()) {
          
          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        srpc.Head.CRpcHead parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (srpc.Head.CRpcHead) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private long sequence_ ;
      /**
       * <code>required uint64 sequence = 10;</code>
       *
       * <pre>
       * RPC序列号      : 用于检验每个回包正确性
       * </pre>
       */
      public boolean hasSequence() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>required uint64 sequence = 10;</code>
       *
       * <pre>
       * RPC序列号      : 用于检验每个回包正确性
       * </pre>
       */
      public long getSequence() {
        return sequence_;
      }
      /**
       * <code>required uint64 sequence = 10;</code>
       *
       * <pre>
       * RPC序列号      : 用于检验每个回包正确性
       * </pre>
       */
      public Builder setSequence(long value) {
        bitField0_ |= 0x00000001;
        sequence_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required uint64 sequence = 10;</code>
       *
       * <pre>
       * RPC序列号      : 用于检验每个回包正确性
       * </pre>
       */
      public Builder clearSequence() {
        bitField0_ = (bitField0_ & ~0x00000001);
        sequence_ = 0L;
        onChanged();
        return this;
      }

      private int coloring_ ;
      /**
       * <code>optional uint32 coloring = 20;</code>
       *
       * <pre>
       * RPC请求染色标志: 当前请求是否染色
       * </pre>
       */
      public boolean hasColoring() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * <code>optional uint32 coloring = 20;</code>
       *
       * <pre>
       * RPC请求染色标志: 当前请求是否染色
       * </pre>
       */
      public int getColoring() {
        return coloring_;
      }
      /**
       * <code>optional uint32 coloring = 20;</code>
       *
       * <pre>
       * RPC请求染色标志: 当前请求是否染色
       * </pre>
       */
      public Builder setColoring(int value) {
        bitField0_ |= 0x00000002;
        coloring_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional uint32 coloring = 20;</code>
       *
       * <pre>
       * RPC请求染色标志: 当前请求是否染色
       * </pre>
       */
      public Builder clearColoring() {
        bitField0_ = (bitField0_ & ~0x00000002);
        coloring_ = 0;
        onChanged();
        return this;
      }

      private long colorId_ ;
      /**
       * <code>optional uint64 color_id = 21;</code>
       *
       * <pre>
       * RPC日志染色ID  : 每个方法一个
       * </pre>
       */
      public boolean hasColorId() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * <code>optional uint64 color_id = 21;</code>
       *
       * <pre>
       * RPC日志染色ID  : 每个方法一个
       * </pre>
       */
      public long getColorId() {
        return colorId_;
      }
      /**
       * <code>optional uint64 color_id = 21;</code>
       *
       * <pre>
       * RPC日志染色ID  : 每个方法一个
       * </pre>
       */
      public Builder setColorId(long value) {
        bitField0_ |= 0x00000004;
        colorId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional uint64 color_id = 21;</code>
       *
       * <pre>
       * RPC日志染色ID  : 每个方法一个
       * </pre>
       */
      public Builder clearColorId() {
        bitField0_ = (bitField0_ & ~0x00000004);
        colorId_ = 0L;
        onChanged();
        return this;
      }

      private long flowId_ ;
      /**
       * <code>optional uint64 flow_id = 30;</code>
       *
       * <pre>
       * RPC调用ID      : 每个客户端请求唯一标识
       * </pre>
       */
      public boolean hasFlowId() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      /**
       * <code>optional uint64 flow_id = 30;</code>
       *
       * <pre>
       * RPC调用ID      : 每个客户端请求唯一标识
       * </pre>
       */
      public long getFlowId() {
        return flowId_;
      }
      /**
       * <code>optional uint64 flow_id = 30;</code>
       *
       * <pre>
       * RPC调用ID      : 每个客户端请求唯一标识
       * </pre>
       */
      public Builder setFlowId(long value) {
        bitField0_ |= 0x00000008;
        flowId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional uint64 flow_id = 30;</code>
       *
       * <pre>
       * RPC调用ID      : 每个客户端请求唯一标识
       * </pre>
       */
      public Builder clearFlowId() {
        bitField0_ = (bitField0_ & ~0x00000008);
        flowId_ = 0L;
        onChanged();
        return this;
      }

      private int err_ ;
      /**
       * <code>optional int32 err = 40;</code>
       *
       * <pre>
       * 框架错误码
       * </pre>
       */
      public boolean hasErr() {
        return ((bitField0_ & 0x00000010) == 0x00000010);
      }
      /**
       * <code>optional int32 err = 40;</code>
       *
       * <pre>
       * 框架错误码
       * </pre>
       */
      public int getErr() {
        return err_;
      }
      /**
       * <code>optional int32 err = 40;</code>
       *
       * <pre>
       * 框架错误码
       * </pre>
       */
      public Builder setErr(int value) {
        bitField0_ |= 0x00000010;
        err_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional int32 err = 40;</code>
       *
       * <pre>
       * 框架错误码
       * </pre>
       */
      public Builder clearErr() {
        bitField0_ = (bitField0_ & ~0x00000010);
        err_ = 0;
        onChanged();
        return this;
      }

      private int result_ ;
      /**
       * <code>optional int32 result = 41;</code>
       *
       * <pre>
       * 业务接口返回值
       * </pre>
       */
      public boolean hasResult() {
        return ((bitField0_ & 0x00000020) == 0x00000020);
      }
      /**
       * <code>optional int32 result = 41;</code>
       *
       * <pre>
       * 业务接口返回值
       * </pre>
       */
      public int getResult() {
        return result_;
      }
      /**
       * <code>optional int32 result = 41;</code>
       *
       * <pre>
       * 业务接口返回值
       * </pre>
       */
      public Builder setResult(int value) {
        bitField0_ |= 0x00000020;
        result_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional int32 result = 41;</code>
       *
       * <pre>
       * 业务接口返回值
       * </pre>
       */
      public Builder clearResult() {
        bitField0_ = (bitField0_ & ~0x00000020);
        result_ = 0;
        onChanged();
        return this;
      }

      private com.google.protobuf.ByteString errMsg_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <code>optional bytes err_msg = 42;</code>
       *
       * <pre>
       * 错误描述
       * </pre>
       */
      public boolean hasErrMsg() {
        return ((bitField0_ & 0x00000040) == 0x00000040);
      }
      /**
       * <code>optional bytes err_msg = 42;</code>
       *
       * <pre>
       * 错误描述
       * </pre>
       */
      public com.google.protobuf.ByteString getErrMsg() {
        return errMsg_;
      }
      /**
       * <code>optional bytes err_msg = 42;</code>
       *
       * <pre>
       * 错误描述
       * </pre>
       */
      public Builder setErrMsg(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000040;
        errMsg_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional bytes err_msg = 42;</code>
       *
       * <pre>
       * 错误描述
       * </pre>
       */
      public Builder clearErrMsg() {
        bitField0_ = (bitField0_ & ~0x00000040);
        errMsg_ = getDefaultInstance().getErrMsg();
        onChanged();
        return this;
      }

      private com.google.protobuf.ByteString caller_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <code>optional bytes caller = 50;</code>
       *
       * <pre>
       * RPC调用方业务名
       * </pre>
       */
      public boolean hasCaller() {
        return ((bitField0_ & 0x00000080) == 0x00000080);
      }
      /**
       * <code>optional bytes caller = 50;</code>
       *
       * <pre>
       * RPC调用方业务名
       * </pre>
       */
      public com.google.protobuf.ByteString getCaller() {
        return caller_;
      }
      /**
       * <code>optional bytes caller = 50;</code>
       *
       * <pre>
       * RPC调用方业务名
       * </pre>
       */
      public Builder setCaller(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000080;
        caller_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional bytes caller = 50;</code>
       *
       * <pre>
       * RPC调用方业务名
       * </pre>
       */
      public Builder clearCaller() {
        bitField0_ = (bitField0_ & ~0x00000080);
        caller_ = getDefaultInstance().getCaller();
        onChanged();
        return this;
      }

      private com.google.protobuf.ByteString methodName_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <code>required bytes method_name = 51;</code>
       *
       * <pre>
       * RPC方法名
       * </pre>
       */
      public boolean hasMethodName() {
        return ((bitField0_ & 0x00000100) == 0x00000100);
      }
      /**
       * <code>required bytes method_name = 51;</code>
       *
       * <pre>
       * RPC方法名
       * </pre>
       */
      public com.google.protobuf.ByteString getMethodName() {
        return methodName_;
      }
      /**
       * <code>required bytes method_name = 51;</code>
       *
       * <pre>
       * RPC方法名
       * </pre>
       */
      public Builder setMethodName(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000100;
        methodName_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required bytes method_name = 51;</code>
       *
       * <pre>
       * RPC方法名
       * </pre>
       */
      public Builder clearMethodName() {
        bitField0_ = (bitField0_ & ~0x00000100);
        methodName_ = getDefaultInstance().getMethodName();
        onChanged();
        return this;
      }

      private java.util.List<com.google.protobuf.ByteString> callerStack_ = java.util.Collections.emptyList();
      private void ensureCallerStackIsMutable() {
        if (!((bitField0_ & 0x00000200) == 0x00000200)) {
          callerStack_ = new java.util.ArrayList<com.google.protobuf.ByteString>(callerStack_);
          bitField0_ |= 0x00000200;
         }
      }
      /**
       * <code>repeated bytes caller_stack = 60;</code>
       *
       * <pre>
       * RPC调用栈信息  : 存放方法名
       * </pre>
       */
      public java.util.List<com.google.protobuf.ByteString>
          getCallerStackList() {
        return java.util.Collections.unmodifiableList(callerStack_);
      }
      /**
       * <code>repeated bytes caller_stack = 60;</code>
       *
       * <pre>
       * RPC调用栈信息  : 存放方法名
       * </pre>
       */
      public int getCallerStackCount() {
        return callerStack_.size();
      }
      /**
       * <code>repeated bytes caller_stack = 60;</code>
       *
       * <pre>
       * RPC调用栈信息  : 存放方法名
       * </pre>
       */
      public com.google.protobuf.ByteString getCallerStack(int index) {
        return callerStack_.get(index);
      }
      /**
       * <code>repeated bytes caller_stack = 60;</code>
       *
       * <pre>
       * RPC调用栈信息  : 存放方法名
       * </pre>
       */
      public Builder setCallerStack(
          int index, com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureCallerStackIsMutable();
        callerStack_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bytes caller_stack = 60;</code>
       *
       * <pre>
       * RPC调用栈信息  : 存放方法名
       * </pre>
       */
      public Builder addCallerStack(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureCallerStackIsMutable();
        callerStack_.add(value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bytes caller_stack = 60;</code>
       *
       * <pre>
       * RPC调用栈信息  : 存放方法名
       * </pre>
       */
      public Builder addAllCallerStack(
          java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
        ensureCallerStackIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, callerStack_);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bytes caller_stack = 60;</code>
       *
       * <pre>
       * RPC调用栈信息  : 存放方法名
       * </pre>
       */
      public Builder clearCallerStack() {
        callerStack_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000200);
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:srpc.CRpcHead)
    }

    static {
      defaultInstance = new CRpcHead(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:srpc.CRpcHead)
  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_srpc_CRpcHead_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_srpc_CRpcHead_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\nhead.proto\022\004srpc\"\272\001\n\010CRpcHead\022\020\n\010seque" +
      "nce\030\n \002(\004\022\020\n\010coloring\030\024 \001(\r\022\020\n\010color_id\030" +
      "\025 \001(\004\022\017\n\007flow_id\030\036 \001(\004\022\013\n\003err\030( \001(\005\022\016\n\006r" +
      "esult\030) \001(\005\022\017\n\007err_msg\030* \001(\014\022\016\n\006caller\0302" +
      " \001(\014\022\023\n\013method_name\0303 \002(\014\022\024\n\014caller_stac" +
      "k\030< \003(\014"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
          public com.google.protobuf.ExtensionRegistry assignDescriptors(
              com.google.protobuf.Descriptors.FileDescriptor root) {
            descriptor = root;
            return null;
          }
        };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
    internal_static_srpc_CRpcHead_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_srpc_CRpcHead_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_srpc_CRpcHead_descriptor,
        new java.lang.String[] { "Sequence", "Coloring", "ColorId", "FlowId", "Err", "Result", "ErrMsg", "Caller", "MethodName", "CallerStack", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
